package com.sie.demo.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
 * @author liaozhifeng
 * @date 2021/8/7 21:38
 * @Version 1.0
 */
@Data
@TableName("menu")

public class Menu implements Serializable {
    /**
     * 菜单ID
     */
    @TableId
    private Long menuId;

    /**
     * 父菜单ID，一级菜单为0
     */
    private Long parentId;

    /**
     * 父菜单名称
     */
    @TableField(exist=false)
    private String parentName;

    /**
     * 菜单名称
     */
    private String menuName;

    /**
     * 菜单URL
     */
    private String url;

    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    private String menuIdentify;

    /**
     * 类型     1：目录   2：菜单   3：按钮
     */
    private Integer menuType;

    /**
     * 菜单图标
     */
    private String menuIcon;

    /**
     * 排序
     */
    private Integer sortNumber;
    @TableLogic
    @TableField("IS_DELETE")
    private int isDelete;
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private Timestamp updateTime;
    private int status;
    @TableField(exist=false)
    private List<Menu> childList;
    String note;

}
